<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
               "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>In-Place Textbox Element Element</title>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2010-11-22 10:50:10 EST"/>
<meta name="author" content="Rusty Klophaus (@rklophaus)"/>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<style type="text/css">
 <!--/*--><![CDATA[/*><!--*/
  html { font-family: Times, serif; font-size: 12pt; }
  .title  { text-align: center; }
  .todo   { color: red; }
  .done   { color: green; }
  .tag    { background-color: #add8e6; font-weight:normal }
  .target { }
  .timestamp { color: #bebebe; }
  .timestamp-kwd { color: #5f9ea0; }
  p.verse { margin-left: 3% }
  pre {
	border: 1pt solid #AEBDCC;
	background-color: #F3F5F7;
	padding: 5pt;
	font-family: courier, monospace;
        font-size: 90%;
        overflow:auto;
  }
  table { border-collapse: collapse; }
  td, th { vertical-align: top; }
  dt { font-weight: bold; }
  div.figure { padding: 0.5em; }
  div.figure p { text-align: center; }
  textarea { overflow-x: auto; }
  .linenr { font-size:smaller }
  .code-highlighted {background-color:#ffff00;}
  .org-info-js_info-navigation { border-style:none; }
  #org-info-js_console-label { font-size:10px; font-weight:bold;
                               white-space:nowrap; }
  .org-info-js_search-highlight {background-color:#ffff00; color:#000000;
                                 font-weight:bold; }
  /*]]>*/-->
</style>
<LINK href='../stylesheet.css' rel='stylesheet' type='text/css' />
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
 function CodeHighlightOn(elem, id)
 {
   var target = document.getElementById(id);
   if(null != target) {
     elem.cacheClassElem = elem.className;
     elem.cacheClassTarget = target.className;
     target.className = "code-highlighted";
     elem.className   = "code-highlighted";
   }
 }
 function CodeHighlightOff(elem, id)
 {
   var target = document.getElementById(id);
   if(elem.cacheClassElem)
     elem.className = elem.cacheClassElem;
   if(elem.cacheClassTarget)
     target.className = elem.cacheClassTarget;
 }
/*]]>*///-->
</script>
</head>
<body>
<div id="content">

<h1 class="title">In-Place Textbox Element Element</h1>

<p><a href="../index.html">Getting Started</a> | <a href="../api.html">API</a> | Elements | <a href="../actions.html">Actions</a> | <a href="../validators.html">Validators</a> | <a href="../handlers.html">Handlers</a> | <a href="../about.html">About</a>
</p>


<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 In-Place Textbox Element - #inplace<sub>textbox</sub> {} </a></li>
</ul>
</div>
</div>

<div id="outline-container-1" class="outline-2">
<h2 id="sec-1"><span class="section-number-2">1</span> In-Place Textbox Element - #inplace<sub>textbox</sub> {} </h2>
<div class="outline-text-2" id="text-1">


<p>
The inplace_textbox element creates a textbox that the user can
edit in place.
</p>
<p>
The user clicks on the label, and it is replaced with a textbox, an OK button, and a
Cancel button. 
</p>
<p>
If the user clicks OK, a callback is issued to the delegate module
so that it can save the new text.
</p>

</div>

<div id="outline-container-1_1" class="outline-3">
<h3 id="sec-1_1"><span class="section-number-3">1.1</span> Usage </h3>
<div class="outline-text-3" id="text-1_1">





<pre class="src src-erlang">#<span style="color: #28439B;">inplace_textbox</span> { id=textbox1, text=<span style="color: #09A240;">"Some text."</span> }
</pre>



</div>

</div>

<div id="outline-container-1_2" class="outline-3">
<h3 id="sec-1_2"><span class="section-number-3">1.2</span> Attributes </h3>
<div class="outline-text-3" id="text-1_2">


<dl>
<dt>text - (<i>string</i>)</dt><dd>
Set the textbox's contents.

</dd>
<dt>html_encode - (<i>boolean</i>)</dt><dd>
Set to true to safely html-encode the text.

</dd>
<dt>start_mode - (/Atom, 'edit' or 'view'/)</dt><dd>
Set whether the textbox should start in edit mode or view mode.

</dd>
<dt>validators - (<i>Validator, or list of validators.</i>)</dt><dd>
Validators to apply to the textbox.

</dd>
<dt>tag - (<i>Erlang term</i>)</dt><dd>
See the delegate attribute for details.

</dd>
</dl>
</div>

</div>

<div id="outline-container-1_3" class="outline-3">
<h3 id="sec-1_3"><span class="section-number-3">1.3</span> Callbacks </h3>
<div class="outline-text-3" id="text-1_3">



</div>

<div id="outline-container-1_3_1" class="outline-4">
<h4 id="sec-1_3_1"><span class="section-number-4">1.3.1</span> inplace_textbox<sub>event</sub>(Tag, Value) </h4>
<div class="outline-text-4" id="text-1_3_1">


<p>
Called when the user presses the OK button. Tag is specified in
the 'tag' attribute, above.  Value is the current value of the
textbox. This callback function should process the value as
necessary, and must return either the value itself, or a new value
that will be sent back to the page and set as the value of the
textbox.
</p>
</div>
</div>

</div>

<div id="outline-container-1_4" class="outline-3">
<h3 id="sec-1_4"><span class="section-number-3">1.4</span> See Also </h3>
<div class="outline-text-3" id="text-1_4">


<ul>
<li>
<a href="./base.html">base element</a>

</li>
<li>
<a href="./textbox.html">textbox element</a>


</li>
</ul>
</div>
</div>
</div>
<div id="postamble">
<p class="author"> Author: Rusty Klophaus (@rklophaus)
</p>
<p class="date"> Date: 2010-11-22 10:50:10 EST</p>
<p class="creator">HTML generated by org-mode 7.01h in emacs 24</p>
</div>
</div>
</body>
</html>
